<!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core"
	xmlns:sf="http://www.springframework.org/tags/faces"
	xmlns:a4j="http://richfaces.org/a4j"
	xmlns:rich="http://richfaces.org/rich"
	xmlns:spring="http://www.springframework.org/tags"
	template="../../../layout/Template.xhtml">



  <ui:define name="content">
    <h:form id="listClient">

       <ui:fragment id="listClientFragment">


			<h:panelGrid columns="2">
					<rich:datascroller for="table_clients">
						<f:facet name="first">
							<h:outputText value="First" />
						</f:facet>
						<f:facet name="last">
							<h:outputText value="End" />
						</f:facet>
					</rich:datascroller>

					<h:panelGroup style="display:block; text-align:right">
						<h:commandButton type="submit" value="Add Client" action="add" />
					</h:panelGroup>
			</h:panelGrid>

           <rich:dataTable id="table_clients" value="#{flowScope.listClient}"
                var="cl" border="1" cellspacing="2" rows="5" width="60%">
                <rich:column align="center">
                    <f:facet name="header">
                        <h:outputText value="Control Action"/>
                    </f:facet>
                    
                    <h:panelGrid cellspacing="4" columns="3">
							<h:commandLink type="submit" value="Consulter" action="consult" />
                            <h:commandLink type="submit" value="Reglements" action="listReglement" />
							<h:commandLink type="submit" value="Update" action="update" />
							<h:commandLink type="submit" value="Delete" action="delete" />
					</h:panelGrid>
                </rich:column>

                <rich:column align="center">
                    <f:facet name="header">
                        <h:outputText value="name" />
                    </f:facet>
                    <h:outputText value="#{cl.lastName}" />
                </rich:column>
                <rich:column align="center">
                    <f:facet name="header">
                        <h:outputText value="prenom" />
                    </f:facet>
                    <h:outputText value="#{cl.firstName}" />
                </rich:column>
                <rich:column align="center">
                   <f:facet name="header">
                        <h:outputText value="telephone" />
                    </f:facet>
                    <h:outputText value="#{cl.telephone}" />
                </rich:column>
                <rich:column align="center">
                    <f:facet name="header">
                        <h:outputText value="address" />
                    </f:facet>
                    <h:outputText value="#{cl.address}" />
                </rich:column>
            </rich:dataTable>
           
        </ui:fragment>

    </h:form>

 </ui:define>
</ui:composition>